﻿<!--
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.
// All other rights reserved.
-->
<UserControl
  x:Class="System.Windows.Controls.Samples.AccordionUsage"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:layoutToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit"
  xmlns:vsm="clr-namespace:System.Windows;assembly=WPFToolkit"
  xmlns:layoutToolkitPrimitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Layout.Toolkit"
  xmlns:sys="clr-namespace:System;assembly=mscorlib">
    <StackPanel>
        <ContentControl
      Content="Hardcoded items - text"
      Style="{StaticResource Header}" />
        <layoutToolkit:Accordion
      HorizontalAlignment="Stretch">
            <layoutToolkit:AccordionItem
        Header="Hello"
        Content="World" />
            <layoutToolkit:AccordionItem
        Header="foo"
        Content="bar" />
            <layoutToolkit:AccordionItem
        Header="mini"
        Content="me" />
        </layoutToolkit:Accordion>
        <ContentControl
      Content="Hardcoded items - UI Elements"
      Style="{StaticResource Header}" />
        <layoutToolkit:Accordion
      HorizontalAlignment="Stretch">
            <layoutToolkit:AccordionItem>
                <layoutToolkit:AccordionItem.Header>
                    <TextBlock
            Text="Image" />
                </layoutToolkit:AccordionItem.Header>
                <layoutToolkit:AccordionItem.Content>
                    <Image
            Source="Bing.png" />
                </layoutToolkit:AccordionItem.Content>
            </layoutToolkit:AccordionItem >
            <layoutToolkit:AccordionItem>
                <layoutToolkit:AccordionItem.Header>
                    <TextBlock
            Text="Button" />
                </layoutToolkit:AccordionItem.Header>
                <layoutToolkit:AccordionItem.Content>
                    <Button
            Content="button as content"
            Margin="10" />
                </layoutToolkit:AccordionItem.Content>
            </layoutToolkit:AccordionItem>
        </layoutToolkit:Accordion>
        <ContentControl
      Content="Orientation left"
      Style="{StaticResource Header}" />
        <layoutToolkit:Accordion
      ExpandDirection="Left"
      Height="150">
            <layoutToolkit:AccordionItem
        Header="Hello"
        Content="World" />
            <layoutToolkit:AccordionItem
        Header="foo"
        Content="bar" />
            <layoutToolkit:AccordionItem
        Header="mini"
        Content="me" />
        </layoutToolkit:Accordion>
        <ContentControl
      Content="One item selected"
      Style="{StaticResource Header}" />
        <layoutToolkit:Accordion
      HorizontalAlignment="Stretch">
            <layoutToolkit:AccordionItem
        Header="Hello"
        Content="World" />
            <layoutToolkit:AccordionItem
        Header="foo"
        Content="bar" />
            <layoutToolkit:AccordionItem
        Header="mini"
        Content="me"
        IsSelected="True" />
        </layoutToolkit:Accordion>
        <ContentControl
      Content="Allowing multiple items"
      Style="{StaticResource Header}" />
        <layoutToolkit:Accordion
      HorizontalAlignment="Stretch"
      SelectionMode="ZeroOrMore">
            <layoutToolkit:AccordionItem
        Header="Hello"
        Content="World"
        IsSelected="True" />
            <layoutToolkit:AccordionItem
        Header="foo"
        Content="bar"
        IsSelected="True" />
            <layoutToolkit:AccordionItem
        Header="mini"
        Content="me" />
        </layoutToolkit:Accordion>
        <ContentControl
      Content="Require one open accordion"
      Style="{StaticResource Header}" />
        <layoutToolkit:Accordion
      HorizontalAlignment="Stretch"
      SelectionMode="OneOrMore">
            <layoutToolkit:AccordionItem
        Header="Hello"
        Content="World"
        IsSelected="True" />
            <layoutToolkit:AccordionItem
        Header="foo"
        Content="bar" />
            <layoutToolkit:AccordionItem
        Header="mini"
        Content="me" />
        </layoutToolkit:Accordion>
        <ContentControl
      Content="Sequential animation"
      Style="{StaticResource Header}" />
        <layoutToolkit:Accordion
      HorizontalAlignment="Stretch"
      SelectionSequence="CollapseBeforeExpand">
            <layoutToolkit:AccordionItem
        Header="Hello"
        Content="World" />
            <layoutToolkit:AccordionItem
        Header="foo"
        Content="bar" />
            <layoutToolkit:AccordionItem
        Header="mini"
        Content="me" />
        </layoutToolkit:Accordion>
        <ContentControl
      Content="Generated content"
      Style="{StaticResource Header}" />
        <layoutToolkit:Accordion
      HorizontalAlignment="Stretch"
      x:Name="accordionGeneratedContent">
            <layoutToolkit:Accordion.ContentTemplate>
                <DataTemplate>
                    <TextBlock
            Text="{Binding Key}" />
                </DataTemplate>
            </layoutToolkit:Accordion.ContentTemplate >
            <layoutToolkit:Accordion.ItemTemplate>
                <DataTemplate>
                    <TextBlock
            Text="{Binding Value}" />
                </DataTemplate>
            </layoutToolkit:Accordion.ItemTemplate>
        </layoutToolkit:Accordion>
        <ContentControl
      Content="Default header template"
      Style="{StaticResource Header}" />
        <layoutToolkit:Accordion
      HorizontalAlignment="Stretch"
      x:Name="accordionDefaultHeaderTemplate"
      DisplayMemberPath="Value">
            <layoutToolkit:Accordion.ContentTemplate>
                <DataTemplate>
                    <TextBlock
            Text="{Binding Key}" />
                </DataTemplate>
            </layoutToolkit:Accordion.ContentTemplate >
        </layoutToolkit:Accordion>
        <ContentControl
      Content="Using selectionChanged event"
      Style="{StaticResource Header}" />
        <layoutToolkit:Accordion
      HorizontalAlignment="Stretch"
      SelectionMode="ZeroOrMore"
      SelectionChanged="Accordion_SelectionChanged">
            <layoutToolkit:AccordionItem
        Header="Hello"
        Content="World"
        IsSelected="True" />
            <layoutToolkit:AccordionItem
        Header="foo"
        Content="bar"
        IsSelected="True" />
            <layoutToolkit:AccordionItem
        Header="mini"
        Content="me" />
        </layoutToolkit:Accordion>
        <ContentControl
      Content="Expanding/collapsing an entire accordion"
      Style="{StaticResource Header}" />
        <layoutToolkit:Accordion
      HorizontalAlignment="Stretch"
      x:Name="accordionExpandCollapse"
      SelectionMode="ZeroOrMore">
            <layoutToolkit:AccordionItem
        Header="Hello"
        Content="World" />
            <layoutToolkit:AccordionItem
        Header="foo"
        Content="bar" />
            <layoutToolkit:AccordionItem
        Header="mini"
        Content="me" />
        </layoutToolkit:Accordion>
        <StackPanel
      Orientation="Horizontal">
            <Button
        Click="ExpandAll_Click"
        Content="Expand Accordion"
        Margin="2" />
            <Button
        Click="CollapseAll_Click"
        Content="Collapse Accordion"
        Margin="2" />
        </StackPanel>
        <ContentControl
      Content="Finding the currently selected clr types"
      Style="{StaticResource Header}" />
        <layoutToolkit:Accordion
      HorizontalAlignment="Stretch"
      x:Name="accordionCLRTypes"
      SelectionMode="ZeroOrMore"
      SelectedItemsChanged="CLRTypesSelectedItemsChanged">
            <layoutToolkit:Accordion.ContentTemplate>
                <DataTemplate>
                    <TextBlock
            Text="{Binding Key}" />
                </DataTemplate>
            </layoutToolkit:Accordion.ContentTemplate>
            <layoutToolkit:Accordion.ItemTemplate>
                <DataTemplate>
                    <TextBlock
            Text="{Binding Value}" />
                </DataTemplate>
            </layoutToolkit:Accordion.ItemTemplate>
        </layoutToolkit:Accordion>
        <ContentControl
      Content="Getting an AccordionItem from an Item"
      Style="{StaticResource Header}" />
        <layoutToolkit:Accordion
      HorizontalAlignment="Stretch"
      SelectionMode="ZeroOrMore"
      x:Name="accordionAccordionItem"
      Loaded="SetMouseEvents">
            <layoutToolkit:Accordion.ContentTemplate>
                <DataTemplate>
                    <TextBlock
            Text="{Binding Key}" />
                </DataTemplate>
            </layoutToolkit:Accordion.ContentTemplate>
            <layoutToolkit:Accordion.ItemTemplate>
                <DataTemplate>
                    <TextBlock
            Text="{Binding Value}" />
                </DataTemplate>
            </layoutToolkit:Accordion.ItemTemplate>
        </layoutToolkit:Accordion>
        <ContentControl
      Content="Restyling and retemplating AccordionItems"
      Style="{StaticResource Header}" />
        <layoutToolkit:Accordion
      HorizontalAlignment="Stretch">
            <layoutToolkit:AccordionItem
        Header="Hello"
        Content="World" />
            <layoutToolkit:AccordionItem
        Header="foo"
        Content="bar" />
            <layoutToolkit:AccordionItem
        Header="mini"
        Content="me" />
            <layoutToolkit:Accordion.ItemContainerStyle>
                <Style
          TargetType="layoutToolkit:AccordionItem">
                    <Setter
            Property="Cursor"
            Value="Hand" />
                    <Setter
            Property="Template">
                        <Setter.Value>
                            <ControlTemplate
                TargetType="layoutToolkit:AccordionItem">
                                <Grid
                  Background="Transparent">
                                    <vsm:VisualStateManager.VisualStateGroups>
                                        <!-- CommonState -->
                                        <vsm:VisualStateGroup
                      x:Name="CommonStates">
                                            <vsm:VisualStateGroup.Transitions>
                                                <vsm:VisualTransition
                          GeneratedDuration="0" />
                                            </vsm:VisualStateGroup.Transitions>
                                            <vsm:VisualState
                        x:Name="Normal" />
                                            <vsm:VisualState
                        x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimation
                            Duration="0"
                            Storyboard.TargetName="DisabledVisualElement"
                            Storyboard.TargetProperty="(UIElement.Opacity)"
                            To="1" />
                                                </Storyboard>
                                            </vsm:VisualState>
                                        </vsm:VisualStateGroup>
                                        <!-- FocusStates -->
                                        <vsm:VisualStateGroup
                      x:Name="FocusStates">
                                            <vsm:VisualState
                        x:Name="Focused">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames
                            Duration="0"
                            Storyboard.TargetName="FocusVisualElement"
                            Storyboard.TargetProperty="Visibility">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <Visibility>Visible</Visibility>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </vsm:VisualState>
                                            <!-- Unfocused -->
                                            <vsm:VisualState
                        x:Name="Unfocused" />
                                        </vsm:VisualStateGroup>
                                        <!-- ExpansionStates -->
                                        <vsm:VisualStateGroup
                      x:Name="ExpansionStates">
                                            <vsm:VisualStateGroup.Transitions>
                                                <vsm:VisualTransition
                          GeneratedDuration="0" />
                                            </vsm:VisualStateGroup.Transitions>
                                            <vsm:VisualState
                        x:Name="Collapsed">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames
                            BeginTime="00:00:00"
                            Storyboard.TargetName="ExpandSite"
                            Storyboard.TargetProperty="(layoutToolkitPrimitives:ExpandableContentControl.Percentage)">
                                                        <SplineDoubleKeyFrame
                              KeyTime="00:00:00.3"
                              KeySpline="0.2,0,0,1"
                              Value="0" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </vsm:VisualState>
                                            <vsm:VisualState
                        x:Name="Expanded">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames
                            BeginTime="00:00:00"
                            Storyboard.TargetName="ExpandSite"
                            Storyboard.TargetProperty="(layoutToolkitPrimitives:ExpandableContentControl.Percentage)">
                                                        <SplineDoubleKeyFrame
                              KeyTime="00:00:00.3"
                              KeySpline="0.2,0,0,1"
                              Value="1" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </vsm:VisualState>
                                        </vsm:VisualStateGroup>
                                        <!-- ExpansionStates -->
                                        <vsm:VisualStateGroup
                      x:Name="LockedStates">
                                            <vsm:VisualStateGroup.Transitions>
                                                <vsm:VisualTransition
                          GeneratedDuration="0" />
                                            </vsm:VisualStateGroup.Transitions>
                                            <vsm:VisualState
                        x:Name="Locked">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames
                            Duration="0"
                            Storyboard.TargetName="ExpanderButton"
                            Storyboard.TargetProperty="IsEnabled">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <sys:Boolean>False</sys:Boolean>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </vsm:VisualState>
                                            <vsm:VisualState
                        x:Name="Unlocked">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames
                            Duration="0"
                            Storyboard.TargetName="ExpanderButton"
                            Storyboard.TargetProperty="IsEnabled">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <sys:Boolean>True</sys:Boolean>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </vsm:VisualState>
                                        </vsm:VisualStateGroup>
                                        <!-- ExpandDirectionStates-->
                                        <vsm:VisualStateGroup
                      x:Name="ExpandDirectionStates">
                                            <vsm:VisualStateGroup.Transitions>
                                                <vsm:VisualTransition
                          GeneratedDuration="0" />
                                            </vsm:VisualStateGroup.Transitions>
                                            <vsm:VisualState
                        x:Name="ExpandDown">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames
                            Duration="0"
                            Storyboard.TargetName="rd1"
                            Storyboard.TargetProperty="Height">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <GridLength>*</GridLength>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames
                            Duration="0"
                            Storyboard.TargetName="cd0"
                            Storyboard.TargetProperty="Width">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <GridLength>*</GridLength>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </vsm:VisualState>
                                            <vsm:VisualState
                        x:Name="ExpandUp">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames
                            Duration="0"
                            Storyboard.TargetName="ExpanderButton"
                            Storyboard.TargetProperty="(Grid.Row)">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <sys:Int32>1</sys:Int32>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames
                            Duration="0"
                            Storyboard.TargetName="ExpandSite"
                            Storyboard.TargetProperty="(Grid.Row)">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <sys:Int32>0</sys:Int32>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames
                            Duration="0"
                            Storyboard.TargetName="rd0"
                            Storyboard.TargetProperty="Height">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <GridLength>*</GridLength>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames
                            Duration="0"
                            Storyboard.TargetName="cd0"
                            Storyboard.TargetProperty="Width">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <GridLength>*</GridLength>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </vsm:VisualState>
                                            <vsm:VisualState
                        x:Name="ExpandLeft">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames
                            Duration="0"
                            Storyboard.TargetName="ExpanderButton"
                            Storyboard.TargetProperty="(Grid.ColumnSpan)">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <sys:Int32>1</sys:Int32>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames
                            Duration="0"
                            Storyboard.TargetName="ExpandSite"
                            Storyboard.TargetProperty="(Grid.ColumnSpan)">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <sys:Int32>1</sys:Int32>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames
                            Duration="0"
                            Storyboard.TargetName="ExpanderButton"
                            Storyboard.TargetProperty="(Grid.RowSpan)">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <sys:Int32>2</sys:Int32>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames
                            Duration="0"
                            Storyboard.TargetName="ExpandSite"
                            Storyboard.TargetProperty="(Grid.RowSpan)">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <sys:Int32>2</sys:Int32>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames
                            Duration="0"
                            Storyboard.TargetName="ExpanderButton"
                            Storyboard.TargetProperty="(Grid.Column)">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <sys:Int32>1</sys:Int32>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames
                            Duration="0"
                            Storyboard.TargetName="ExpandSite"
                            Storyboard.TargetProperty="(Grid.Row)">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <sys:Int32>0</sys:Int32>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames
                            Duration="0"
                            Storyboard.TargetName="rd0"
                            Storyboard.TargetProperty="Height">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <GridLength>*</GridLength>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames
                            Duration="0"
                            Storyboard.TargetName="cd0"
                            Storyboard.TargetProperty="Width">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <GridLength>*</GridLength>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </vsm:VisualState>
                                            <vsm:VisualState
                        x:Name="ExpandRight">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames
                            Duration="0"
                            Storyboard.TargetName="ExpanderButton"
                            Storyboard.TargetProperty="(Grid.ColumnSpan)">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <sys:Int32>1</sys:Int32>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames
                            Duration="0"
                            Storyboard.TargetName="ExpandSite"
                            Storyboard.TargetProperty="(Grid.ColumnSpan)">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <sys:Int32>1</sys:Int32>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames
                            Duration="0"
                            Storyboard.TargetName="ExpanderButton"
                            Storyboard.TargetProperty="(Grid.RowSpan)">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <sys:Int32>2</sys:Int32>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames
                            Duration="0"
                            Storyboard.TargetName="ExpandSite"
                            Storyboard.TargetProperty="(Grid.RowSpan)">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <sys:Int32>2</sys:Int32>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames
                            Duration="0"
                            Storyboard.TargetName="ExpandSite"
                            Storyboard.TargetProperty="(Grid.Row)">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <sys:Int32>0</sys:Int32>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames
                            Duration="0"
                            Storyboard.TargetName="ExpandSite"
                            Storyboard.TargetProperty="(Grid.Column)">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <sys:Int32>1</sys:Int32>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames
                            Duration="0"
                            Storyboard.TargetName="rd0"
                            Storyboard.TargetProperty="Height">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <GridLength>*</GridLength>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames
                            Duration="0"
                            Storyboard.TargetName="cd1"
                            Storyboard.TargetProperty="Width">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <GridLength>*</GridLength>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </vsm:VisualState>
                                        </vsm:VisualStateGroup>
                                    </vsm:VisualStateManager.VisualStateGroups>
                                    <Border
                    x:Name="Background"
                    Padding="{TemplateBinding Padding}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}">
                                        <Grid>
                                            <Grid.RowDefinitions>
                                                <RowDefinition
                          Height="Auto"
                          x:Name="rd0" />
                                                <RowDefinition
                          Height="Auto"
                          x:Name="rd1" />
                                            </Grid.RowDefinitions>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition
                          Width="Auto"
                          x:Name="cd0" />
                                                <ColumnDefinition
                          Width="Auto"
                          x:Name="cd1" />
                                            </Grid.ColumnDefinitions>
                                            <layoutToolkitPrimitives:AccordionButton
                        x:Name="ExpanderButton"
                        DataContext="{Binding}"
                        Content="{TemplateBinding Header}"
                        ContentTemplate="{TemplateBinding HeaderTemplate}"
                        IsChecked="{TemplateBinding IsSelected}"
                        Grid.Column="0"
                        Grid.ColumnSpan="2"
                        Grid.Row="0"
                        Padding="2"
                        Margin="1"
                        FontFamily="{TemplateBinding FontFamily}"
                        FontSize="{TemplateBinding FontSize}"
                        FontStretch="{TemplateBinding FontStretch}"
                        FontStyle="{TemplateBinding FontStyle}"
                        FontWeight="{TemplateBinding FontWeight}"
                        Foreground="{TemplateBinding Foreground}"
                        HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />
                                            <layoutToolkitPrimitives:ExpandableContentControl
                        x:Name="ExpandSite"
                        Grid.Column="0"
                        Grid.ColumnSpan="2"
                        Grid.Row="1"
                        Percentage="0"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        RevealMode="{TemplateBinding ExpandDirection}"
                        Padding="2"
                        Margin="1"
                        FontFamily="{TemplateBinding FontFamily}"
                        FontSize="{TemplateBinding FontSize}"
                        FontStretch="{TemplateBinding FontStretch}"
                        FontStyle="{TemplateBinding FontStyle}"
                        FontWeight="{TemplateBinding FontWeight}"
                        Foreground="{TemplateBinding Foreground}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />
                                        </Grid>
                                    </Border>
                                    <Border
                    x:Name="DisabledVisualElement"
                    IsHitTestVisible="false"
                    Opacity="0"
                    Background="#A5FFFFFF"
                    CornerRadius="3" />
                                    <Border
                    x:Name="FocusVisualElement"
                    IsHitTestVisible="false"
                    Visibility="Collapsed"
                    BorderThickness="1"
                    CornerRadius="3">
                                        <Border.BorderBrush>
                                            <LinearGradientBrush
                        EndPoint="0.5,1"
                        StartPoint="0.5,0">
                                                <GradientStop
                          Color="#FFA3AEB9" />
                                                <GradientStop
                          Color="#FF8399A9"
                          Offset="0.375" />
                                                <GradientStop
                          Color="#FF718597"
                          Offset="0.375" />
                                                <GradientStop
                          Color="#FF617584"
                          Offset="1" />
                                            </LinearGradientBrush>
                                        </Border.BorderBrush>
                                    </Border>
                                    <Rectangle
                    StrokeDashArray="2 1"
                    StrokeThickness="3"
                    Stroke="Black"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch" />
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </layoutToolkit:Accordion.ItemContainerStyle>
        </layoutToolkit:Accordion>
    </StackPanel>
</UserControl>
